//顺序存储的循环队列，实现任务池
#ifndef MYPIPE H
#define MYPIPE_H

#define PIPESIZE    1024

#define MYPIPE_READ    0x00000001UL
#define MYPIPE_WRITE   0x00000002UL

typedef void mypipe_t;


mypipe_t*mypipe_init(void);  //  初始化
int mypipe_register(mypipe_t *,int opmap);
int mypipe_unregister(mypipe_t *,int opmap);
int mypipe_read (mypipe_t *,void *buf, size_t count); //读管道

int mypipe_write(mypipe_t *, const void *buf, size_t ); //写管道
int mypipe_destroy (mypipe_t *);   //销毁
#endif
